<!DOCTYPE html>
<html lang="zh-cn">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
  <meta name="renderer" content="webkit">
  <title></title>
  <link rel="stylesheet" href=" __PUBLIC__/Admin/css/pintuer.css">
  <link rel="stylesheet" href=" __PUBLIC__/Admin/css/admin.css">
  <link rel="stylesheet" href="__PUBLIC__/editor/css/editormd.min.css" />
  <script src="__PUBLIC__/Admin/js/jquery.js"></script>
  <script src="__PUBLIC__/Admin/js/pintuer.js"></script>
  <script src="__PUBLIC__/js/jquery-2.0.2.js"></script>
  <script src="__PUBLIC__/Admin/js/upload.js"></script>
  <style>
    .nylDate{
      width: 147px;
      height: 43px;
      margin-left: 25px;
      border: solid 1px #ddd;
    }
    input[type=date]::-webkit-inner-spin-button { visibility: hidden; }
    ::-webkit-datetime-edit { padding: 1px; background: url(../selection.gif); }
    /*::-webkit-datetime-edit-fields-wrapper { background-color: #eee; }*/
    ::-webkit-datetime-edit-text { color: #4D90FE; padding: 0 .3em; }
    /*::-webkit-datetime-edit-year-field { color: purple; }
    ::-webkit-datetime-edit-month-field { color: blue; }
    ::-webkit-datetime-edit-day-field { color: green; } */
    ::-webkit-inner-spin-button { visibility: hidden; }
    ::-webkit-calendar-picker-indicator {
      border: 1px solid #ccc;
      border-radius: 2px;
      box-shadow: inset 0 1px #fff, 0 1px #eee;
      /*background-color: #eee;*/
      background-image: -webkit-linear-gradient(top, #f0f0f0, #e6e6e6);
      color: #666;
    }
  </style>
</head>
<body>
<div class="panel admin-panel">
  <div class="panel-head" id="add"><strong><span class="icon-pencil-square-o"></span>修改文章</strong></div>
  <div class="body-content">
    <form method="post" class="form-x" >
      <input type="hidden" name="id" value="{$info['id']}">
      <input type="hidden" name="type" value="{$info['type']}">
      <div class="form-group">
        <div class="label">
          <label>标题：</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" value="{$info['title']}" name="title" data-validate="required:请输入标题" />
          <div class="tips"></div>
        </div>
      </div>
      <div class="form-group">
        <div class="label">
          <label>视频封面：</label>
        </div>
        <div class="field">
          <!-- <div class="input w50" data-validate="required:请选择图片">选择图片</div> -->
          <div class="input  field  upload">
            <img id="show_img1" src="{$info.img|default='__PUBLIC__/Admin/images/default.png'}" alt="">
            <input type="file" id="pic1" class="pic"  val=""/>
            <input type="hidden" name="pic1" value="{$info.img}">
          </div>
          <div class="tips"></div>
        </div>
      </div>
      <div class="form-group">
        <div class="label">
          <label>上传pdf：</label>
        </div>
        <div class="field">
          <!-- <div class="input w50" data-validate="required:请选择图片">选择图片</div> -->
          <div class="input  field  upload file">
            <input type="file"  id="file" class="file"  value="{$info.file}"/>
            <input type="hidden" name="file" value="{$info.file}">
          </div>
          <div class="tips"></div>
        </div>
      </div>
      <div>


      <div class="form-group">
        <div class="label">
          <label></label>
        </div>
        <div class="field">
          <button class="button bg-main icon-check-square-o"  type="submit"> 提交</button>
          <!--<button class="button bg-main icon-check-square-o"  id="add_module" type="button"> 增加模块</button>-->
        </div>
      </div>
    </form>
  </div>
</div>
<script>
    $('.pic').change(function(){
        var picid = $(this).attr("id");
        var show_img = 'show_img'+picid.slice(3);
        // alert(show_img);
        PUB.upload.checkImg(picid,show_img);
        PUB.upload.img_upload(picid,"{:U('Admin/upload/upload')}");
    });
    $(".file").change(function(){
        var picid = $(this).attr("id");
        PUB.upload.img_upload(picid,"{:U('Admin/upload/upload')}");
    })
    var now = new Date();
    //格式化日，如果小于9，前面补0
    var day = ("0" + now.getDate()).slice(-2);
    //格式化月，如果小于9，前面补0
    var month = ("0" + (now.getMonth() + 1)).slice(-2);
    //拼装完整日期格式
    var today = now.getFullYear()+"-"+(month)+"-"+(day) ;
    //完成赋值
    // $('.nylDate').val(today);

</script>
</body>
</html>

